<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Life Runner: Riferimenti per la classe PilaMatrici</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Batteri.jpg"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Life Runner
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Il Gioco della Vita</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generato da Doxygen 1.8.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Cerca');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Pagina&#160;Principale</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classi</span></a></li>
      <li><a href="files.html"><span>File</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Cerca" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Elenco&#160;dei&#160;tipi&#160;composti</span></a></li>
      <li><a href="classes.html"><span>Indice&#160;dei&#160;tipi&#160;composti</span></a></li>
      <li><a href="hierarchy.html"><span>Gerarchia&#160;delle&#160;classi</span></a></li>
      <li><a href="functions.html"><span>Membri&#160;dei&#160;composti</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tutto</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classi</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>File</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funzioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variabili</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Tipi enumerati (enum)</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Valori del tipo enumerato</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pagine</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Composti</a> &#124;
<a href="#pub-methods">Membri pubblici</a> &#124;
<a href="#pub-attribs">Attributi pubblici</a> &#124;
<a href="#pri-types">Tipi privati</a> &#124;
<a href="#pri-methods">Membri privati</a> &#124;
<a href="#pri-attribs">Attributi privati</a> &#124;
<a href="classPilaMatrici-members.html">Elenco di tutti i membri</a>  </div>
  <div class="headertitle">
<div class="title">Riferimenti per la classe PilaMatrici</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="classPilaMatrici.html" title="The PilaMatrici class La classe PilaMatrici si occupa della parte algoritmica e computazionale.">PilaMatrici</a> class La classe <a class="el" href="classPilaMatrici.html" title="The PilaMatrici class La classe PilaMatrici si occupa della parte algoritmica e computazionale.">PilaMatrici</a> si occupa della parte algoritmica e computazionale.  
 <a href="classPilaMatrici.html#details">Continua...</a></p>

<p><code>#include &quot;<a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>&quot;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Composti</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="el" href="structPilaMatrici_1_1Matrix.html" title="The Matrix struct.">Matrix</a> struct.  <a href="structPilaMatrici_1_1Matrix.html#details">Continua...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Membri pubblici</h2></td></tr>
<tr class="memitem:a1bf3cd0a3a8adb847a0fd95533e836a6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a1bf3cd0a3a8adb847a0fd95533e836a6">PilaMatrici</a> (int x, int y, int <a class="el" href="classPilaMatrici.html#af028871def60fbc8c46fedd3b4c7571e">pattern</a>)</td></tr>
<tr class="memdesc:a1bf3cd0a3a8adb847a0fd95533e836a6"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classPilaMatrici.html" title="The PilaMatrici class La classe PilaMatrici si occupa della parte algoritmica e computazionale.">PilaMatrici</a> costruttore.  <a href="#a1bf3cd0a3a8adb847a0fd95533e836a6"></a><br/></td></tr>
<tr class="separator:a1bf3cd0a3a8adb847a0fd95533e836a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb22e1cdc86354f1ec113374d0347f18"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#acb22e1cdc86354f1ec113374d0347f18">~PilaMatrici</a> ()</td></tr>
<tr class="memdesc:acb22e1cdc86354f1ec113374d0347f18"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classPilaMatrici.html" title="The PilaMatrici class La classe PilaMatrici si occupa della parte algoritmica e computazionale.">PilaMatrici</a> decostruttore.  <a href="#acb22e1cdc86354f1ec113374d0347f18"></a><br/></td></tr>
<tr class="separator:acb22e1cdc86354f1ec113374d0347f18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a293d5f6795e2e6963a1e0f358706f937"><td class="memItemLeft" align="right" valign="top">int *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a293d5f6795e2e6963a1e0f358706f937">getMatrix</a> ()</td></tr>
<tr class="memdesc:a293d5f6795e2e6963a1e0f358706f937"><td class="mdescLeft">&#160;</td><td class="mdescRight">Per ottenere la tabella attuale.  <a href="#a293d5f6795e2e6963a1e0f358706f937"></a><br/></td></tr>
<tr class="separator:a293d5f6795e2e6963a1e0f358706f937"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ea12c7a63432eb38362b5adc9959d2d"><td class="memItemLeft" align="right" valign="top">int *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a0ea12c7a63432eb38362b5adc9959d2d">next</a> ()</td></tr>
<tr class="memdesc:a0ea12c7a63432eb38362b5adc9959d2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Permette di avanzare alla matrice successiva.  <a href="#a0ea12c7a63432eb38362b5adc9959d2d"></a><br/></td></tr>
<tr class="separator:a0ea12c7a63432eb38362b5adc9959d2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a817827747ed97447a71b8d083acf4744"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a817827747ed97447a71b8d083acf4744">stampa</a> ()</td></tr>
<tr class="memdesc:a817827747ed97447a71b8d083acf4744"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stampa su stdout l'intera tabella.  <a href="#a817827747ed97447a71b8d083acf4744"></a><br/></td></tr>
<tr class="separator:a817827747ed97447a71b8d083acf4744"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9b2af953563a35bc0533fafac0ad32f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#ad9b2af953563a35bc0533fafac0ad32f">getDimx</a> ()</td></tr>
<tr class="memdesc:ad9b2af953563a35bc0533fafac0ad32f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ritorna la dimensione orizzontale della matrice.  <a href="#ad9b2af953563a35bc0533fafac0ad32f"></a><br/></td></tr>
<tr class="separator:ad9b2af953563a35bc0533fafac0ad32f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbc7b723d420ee0475c6962387114a0e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#adbc7b723d420ee0475c6962387114a0e">getDimy</a> ()</td></tr>
<tr class="memdesc:adbc7b723d420ee0475c6962387114a0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ritorna la dimensione verticale della matrice.  <a href="#adbc7b723d420ee0475c6962387114a0e"></a><br/></td></tr>
<tr class="separator:adbc7b723d420ee0475c6962387114a0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6acf13fe85f6e4c8b050932c7c109c0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#ae6acf13fe85f6e4c8b050932c7c109c0">salva</a> (QString file)</td></tr>
<tr class="memdesc:ae6acf13fe85f6e4c8b050932c7c109c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Salvataggio su File della matrice.  <a href="#ae6acf13fe85f6e4c8b050932c7c109c0"></a><br/></td></tr>
<tr class="separator:ae6acf13fe85f6e4c8b050932c7c109c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac37116f0525280353fccac6e1bbd7543"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#ac37116f0525280353fccac6e1bbd7543">carica</a> (QString file)</td></tr>
<tr class="memdesc:ac37116f0525280353fccac6e1bbd7543"><td class="mdescLeft">&#160;</td><td class="mdescRight">Caricamento da File della matrice.  <a href="#ac37116f0525280353fccac6e1bbd7543"></a><br/></td></tr>
<tr class="separator:ac37116f0525280353fccac6e1bbd7543"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24ae0fe74a46693ea24582a8608ce8df"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a24ae0fe74a46693ea24582a8608ce8df">timeTrip</a> (int)</td></tr>
<tr class="memdesc:a24ae0fe74a46693ea24582a8608ce8df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Viaggio nel tempo.  <a href="#a24ae0fe74a46693ea24582a8608ce8df"></a><br/></td></tr>
<tr class="separator:a24ae0fe74a46693ea24582a8608ce8df"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Attributi pubblici</h2></td></tr>
<tr class="memitem:a69c1ed611ea245f8e77b28d2e47d4079"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a69c1ed611ea245f8e77b28d2e47d4079">matriciRealizzate</a></td></tr>
<tr class="memdesc:a69c1ed611ea245f8e77b28d2e47d4079"><td class="mdescLeft">&#160;</td><td class="mdescRight">Numero di matrici realizzate (utilita' statistica)  <a href="#a69c1ed611ea245f8e77b28d2e47d4079"></a><br/></td></tr>
<tr class="separator:a69c1ed611ea245f8e77b28d2e47d4079"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Tipi privati</h2></td></tr>
<tr class="memitem:a577b11e786ed923662e6be11c8b37340"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a577b11e786ed923662e6be11c8b37340">stato</a> { <a class="el" href="classPilaMatrici.html#a577b11e786ed923662e6be11c8b37340a64f830c1ec16dabf749b8026e8e0265e">morto</a> = 0, 
<a class="el" href="classPilaMatrici.html#a577b11e786ed923662e6be11c8b37340a3e2ddc8c435505116d0123d27fdf3582">vivo</a> = 1
 }</td></tr>
<tr class="separator:a577b11e786ed923662e6be11c8b37340"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Membri privati</h2></td></tr>
<tr class="memitem:a1c99597cb1b8fc81bd8df0a74c04cea2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a1c99597cb1b8fc81bd8df0a74c04cea2">creaMatrice</a> (<a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *succ, <a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *prec, int tempo)</td></tr>
<tr class="separator:a1c99597cb1b8fc81bd8df0a74c04cea2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad27fd7ae4c80db6f058e4f1c1d53bbc3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#ad27fd7ae4c80db6f058e4f1c1d53bbc3">riempiCasuale</a> (<a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *)</td></tr>
<tr class="separator:ad27fd7ae4c80db6f058e4f1c1d53bbc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a213a3a18abf6e92b728228329cd84e82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a213a3a18abf6e92b728228329cd84e82">inizializzaTabella</a> (<a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *, int)</td></tr>
<tr class="separator:a213a3a18abf6e92b728228329cd84e82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0932211906943c62a4880d76baacb9c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#ad0932211906943c62a4880d76baacb9c">inizializzaCasella</a> (<a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *pos, int casella, int valore)</td></tr>
<tr class="separator:ad0932211906943c62a4880d76baacb9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a437f4876f3c26a991d84cd9c5d5302c6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a437f4876f3c26a991d84cd9c5d5302c6">getValore</a> (int *cella, int x, int y)</td></tr>
<tr class="separator:a437f4876f3c26a991d84cd9c5d5302c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b77a2c93ee5f238b41afcc91e7ade7d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a0b77a2c93ee5f238b41afcc91e7ade7d">contaCelluleVive</a> (<a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&amp;)</td></tr>
<tr class="separator:a0b77a2c93ee5f238b41afcc91e7ade7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03cfd164141c4f0df8e826ed44d2155a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a03cfd164141c4f0df8e826ed44d2155a">verificaMatriciUguali</a> (<a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *, <a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *)</td></tr>
<tr class="separator:a03cfd164141c4f0df8e826ed44d2155a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae04b8c2af5ccc24233d8936d333a9830"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#ae04b8c2af5ccc24233d8936d333a9830">patternModeSelector</a> (int)</td></tr>
<tr class="separator:ae04b8c2af5ccc24233d8936d333a9830"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1af0000c2498b94443a0cbf523f0217a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a1af0000c2498b94443a0cbf523f0217a">pattern1</a> ()</td></tr>
<tr class="separator:a1af0000c2498b94443a0cbf523f0217a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab36fca974f9ec75ae3a385bbc4d14c0e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#ab36fca974f9ec75ae3a385bbc4d14c0e">pattern2</a> ()</td></tr>
<tr class="separator:ab36fca974f9ec75ae3a385bbc4d14c0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a833d75c828cf42c6a7aaaafcf9ccdcd6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a833d75c828cf42c6a7aaaafcf9ccdcd6">pattern3</a> ()</td></tr>
<tr class="separator:a833d75c828cf42c6a7aaaafcf9ccdcd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe47ae91e03eb993a0f7273c6a5f0e76"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#abe47ae91e03eb993a0f7273c6a5f0e76">pattern4</a> ()</td></tr>
<tr class="separator:abe47ae91e03eb993a0f7273c6a5f0e76"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Attributi privati</h2></td></tr>
<tr class="memitem:a68e942fec2e4351413744ec4984b4dbe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a></td></tr>
<tr class="separator:a68e942fec2e4351413744ec4984b4dbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5628d441e7836fd04c73268f120d2d9e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a></td></tr>
<tr class="separator:a5628d441e7836fd04c73268f120d2d9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af028871def60fbc8c46fedd3b4c7571e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#af028871def60fbc8c46fedd3b4c7571e">pattern</a></td></tr>
<tr class="separator:af028871def60fbc8c46fedd3b4c7571e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb98428fafcbc5b0b6664c15c0b56112"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#acb98428fafcbc5b0b6664c15c0b56112">testa</a></td></tr>
<tr class="separator:acb98428fafcbc5b0b6664c15c0b56112"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08b715899e30cd0995ee8750e06b0b0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a></td></tr>
<tr class="separator:a08b715899e30cd0995ee8750e06b0b0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70640328db16b15d5803639cf7da902e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a></td></tr>
<tr class="separator:a70640328db16b15d5803639cf7da902e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Descrizione dettagliata</h2>
<div class="textblock"><p>The <a class="el" href="classPilaMatrici.html" title="The PilaMatrici class La classe PilaMatrici si occupa della parte algoritmica e computazionale.">PilaMatrici</a> class La classe <a class="el" href="classPilaMatrici.html" title="The PilaMatrici class La classe PilaMatrici si occupa della parte algoritmica e computazionale.">PilaMatrici</a> si occupa della parte algoritmica e computazionale. </p>
<p>La parte pubblica contiene:</p>
<ul>
<li>Un costruttore e un decostruttore per la pila di matrici</li>
<li>Una funzione next che crea la prossima matrice apportando le giuste modifiche in base alla matrice precedente.</li>
<li>Una funzione stampa con funzionalita' di <a class="el" href="classDebug.html" title="The Debug class.">Debug</a>.</li>
<li>Due funzioni getDimx e getDimy che ritornano la dimensione sull'asse x e y della matrice.</li>
<li>Una funzione Salva e una Carica per gestire i file.</li>
<li>Una funzione timeTrip che permette di passare a matrici precedenti o successive La parte privata contiene:</li>
</ul>
<p>Una struttura <a class="el" href="structPilaMatrici_1_1Matrix.html" title="The Matrix struct.">Matrix</a> che e' la struttura dati fondamentale del di tutto il programma</p>
<ul>
<li>Le dimensioni della matrice e il possibile stato delle cellule</li>
<li>Tre puntatori alla testa, coda e posizione attuale nella lista</li>
<li>Funzione creaMatrice, che inizializza una nuova matrice vuota</li>
<li>Funzione inizializza che azzera tutta la tabella</li>
<li>Funzione riempiCasuale che genera una configurazione casuale di cellule, vive o morte.</li>
<li>Funzione inizializzaCasella che setta il valore di una cellula il particolare</li>
<li>Funzione getValore che ritorna il valore di una cellula</li>
<li>Funzione contaCelluleVive che garantisce le funzionalita' statistiche</li>
<li>Funzione verificaMatriciUguali che confronta due matrici</li>
<li>Funzione patternModeSelector che seleziona il pattern da applicare alla matrice all'avvio del programma. </li>
</ul>

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00044">44</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>
</div><h2 class="groupheader">Documentazione dei tipi enumerati (enum)</h2>
<a class="anchor" id="a577b11e786ed923662e6be11c8b37340"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classPilaMatrici.html#a577b11e786ed923662e6be11c8b37340">PilaMatrici::stato</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl><dt><b>Valori del tipo enumerato: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a577b11e786ed923662e6be11c8b37340a64f830c1ec16dabf749b8026e8e0265e"></a>morto</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a577b11e786ed923662e6be11c8b37340a3e2ddc8c435505116d0123d27fdf3582"></a>vivo</em>&nbsp;</td><td>
</td></tr>
</table>
</dd>
</dl>

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00184">184</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>
<div class="fragment"><div class="line">{<a class="code" href="classPilaMatrici.html#a577b11e786ed923662e6be11c8b37340a64f830c1ec16dabf749b8026e8e0265e">morto</a> = 0, <a class="code" href="classPilaMatrici.html#a577b11e786ed923662e6be11c8b37340a3e2ddc8c435505116d0123d27fdf3582">vivo</a> = 1};</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Documentazione dei costruttori e dei distruttori</h2>
<a class="anchor" id="a1bf3cd0a3a8adb847a0fd95533e836a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PilaMatrici::PilaMatrici </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pattern</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="classPilaMatrici.html" title="The PilaMatrici class La classe PilaMatrici si occupa della parte algoritmica e computazionale.">PilaMatrici</a> costruttore. </p>
<p>Il costruttore inizializza una nuova matrice settando opportunamente tutti i puntatori e il pattern da applicarvi.</p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>La larghezza della matrice </td></tr>
    <tr><td class="paramname">y</td><td>L'altezza della matrice </td></tr>
    <tr><td class="paramname">pattern</td><td>Il pattern da applicare alla matrice </td></tr>
  </table>
  </dd>
</dl>

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00005">5</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    assert(x &gt; 0);</div>
<div class="line">    assert(y &gt; 0);</div>
<div class="line"></div>
<div class="line">    this-&gt;<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> = x;</div>
<div class="line">    this-&gt;<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> = y;</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#acb98428fafcbc5b0b6664c15c0b56112">testa</a> = <a class="code" href="classPilaMatrici.html#a1c99597cb1b8fc81bd8df0a74c04cea2">creaMatrice</a>(NULL, NULL, 0);</div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a> = <a class="code" href="classPilaMatrici.html#acb98428fafcbc5b0b6664c15c0b56112">testa</a>;</div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a> = <a class="code" href="classPilaMatrici.html#acb98428fafcbc5b0b6664c15c0b56112">testa</a>;</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#ae04b8c2af5ccc24233d8936d333a9830">patternModeSelector</a>(<a class="code" href="classPilaMatrici.html#af028871def60fbc8c46fedd3b4c7571e">pattern</a>);</div>
<div class="line"></div>
<div class="line">    TRACE(<span class="stringliteral">&quot;[PilaMatrici::PilaMatrici] PatternMode Selezionata.&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a69c1ed611ea245f8e77b28d2e47d4079" title="Numero di matrici realizzate (utilita&#39; statistica)">matriciRealizzate</a> = 0;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="acb22e1cdc86354f1ec113374d0347f18"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PilaMatrici::~PilaMatrici </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="classPilaMatrici.html" title="The PilaMatrici class La classe PilaMatrici si occupa della parte algoritmica e computazionale.">PilaMatrici</a> decostruttore. </p>
<p>Il decostruttore controlla a che punto della lista di matrici e' la posizione attuale. Se e' maggiore di zero, allora sposta la posizione attuale alla matrice precedente per non perdere l'aggancio alla lista ed elimina iterativamente la matrice posizione attuale dell'iterazione precedente. Se il primo controllo non ha successo, si verifica il caso in cui la posizione attuale sia l'ultima matrice della lista. In questo caso posso deallocare dalla memoria dinamica tutti gli oggetti allocati senza problemi di pending pointer. </p>

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00024">24</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">if</span> (<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> != 0) {</div>
<div class="line">        <span class="keywordflow">for</span> (<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a> = <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a6e8d24ed2b3038b41a7cc92f2aa8d984">prec</a>;</div>
<div class="line">             <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> &lt; 0;</div>
<div class="line">             <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a> = <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a6e8d24ed2b3038b41a7cc92f2aa8d984">prec</a>) {</div>
<div class="line"></div>
<div class="line">            <span class="keyword">delete</span> <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#ac71f38a0dc138d4b418316bd25e6b184">succ</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>;</div>
<div class="line">            <span class="keyword">delete</span> <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#ac71f38a0dc138d4b418316bd25e6b184">succ</a>;</div>
<div class="line"></div>
<div class="line">        }</div>
<div class="line">    } <span class="keywordflow">else</span></div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">if</span> (<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> &lt; <a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a>) {</div>
<div class="line">        <span class="keywordflow">for</span>(<a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a> = <a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a6e8d24ed2b3038b41a7cc92f2aa8d984">prec</a>;</div>
<div class="line">            <a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> != <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a>;</div>
<div class="line">            <a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a> = <a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a6e8d24ed2b3038b41a7cc92f2aa8d984">prec</a>) {</div>
<div class="line"></div>
<div class="line">            <span class="keyword">delete</span> <a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#ac71f38a0dc138d4b418316bd25e6b184">succ</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>;</div>
<div class="line">            <span class="keyword">delete</span> <a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#ac71f38a0dc138d4b418316bd25e6b184">succ</a>;</div>
<div class="line"></div>
<div class="line">        }</div>
<div class="line">    } <span class="keywordflow">else</span></div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">if</span> (<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> == 1) {</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a> = <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a6e8d24ed2b3038b41a7cc92f2aa8d984">prec</a>;</div>
<div class="line">        <span class="keyword">delete</span> <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#ac71f38a0dc138d4b418316bd25e6b184">succ</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>;</div>
<div class="line">        <span class="keyword">delete</span> <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#ac71f38a0dc138d4b418316bd25e6b184">succ</a>;</div>
<div class="line">    } <span class="keywordflow">else</span></div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">if</span> (<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> == 0) {</div>
<div class="line">            <span class="keyword">delete</span> <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>;</div>
<div class="line">            <span class="keyword">delete</span> <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>;</div>
<div class="line">    }</div>
<div class="line">    GD1(cout&lt;&lt;<span class="stringliteral">&quot;[PilaMatrici:~PilaMatrici] oggetto deallocato correttamente&quot;</span></div>
<div class="line">        &lt;&lt;endl);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Documentazione delle funzioni membro</h2>
<a class="anchor" id="a293d5f6795e2e6963a1e0f358706f937"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int * PilaMatrici::getMatrix </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Per ottenere la tabella attuale. </p>
<dl class="section return"><dt>Restituisce</dt><dd>Ritorna un puntatore ad intero </dd></dl>

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00089">89</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">return</span> <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0ea12c7a63432eb38362b5adc9959d2d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int * PilaMatrici::next </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Permette di avanzare alla matrice successiva. </p>
<dl class="section return"><dt>Restituisce</dt><dd>temp-&gt;tabella La tabella appena modificata</dd></dl>
<p>Questa funzione non prende in ingresso alcun parametro perche' utilizza cio' che e' gia' inizializzato nella classe. 1) Inizializza una nuova matrice dinamica come posizioneAttuale e setta il puntatore alla prossima matrice a NULL. 2) Inizializza un intero somma per eseguire il calcolo dell'algoritmo e inizializza anche due puntatori a intero, uno per la tabella temp appena creata (posizioneAttuale-&gt;tabella) e uno alla tabella temporanea (temp-&gt;tabella) per semplificare e rendere leggibile il codice. 3) Tramite la funione getValore, acquisisce e somma il valore di tutte le 8 caselle attorno alla casella corrente (si fa un'iterazione su ogni casella con un doppio ciclo for). L'algoritmo prevede che se una cellula e' morta e ve ne sono 3 vive intorno questa prende vita, al contrario, se la cellula e' viva e ce ne sono piu' di 3 o meno di 2 questa muore. Semplicemente sommando i valori delle cellule attorno alla cellula attuale ottengo il numero di cellule vive. Se le cellule vive sono 3 allora la cellula e' viva, altrimenti morta. Questo si puu' realizzare con due semplici controlli. 4) Dopo aver modificato completamente la tabella temp, setta la posizioneAttuale a temp, cosi' da ritornare la nuova tabella appena creata. </p>

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00136">136</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    TRACE(<span class="stringliteral">&quot;[PilaMatrici::next] Sto per inizializzare la prossima matrice.&quot;</span>);</div>
<div class="line"></div>
<div class="line">    Matrix* temp = <a class="code" href="classPilaMatrici.html#a1c99597cb1b8fc81bd8df0a74c04cea2">creaMatrice</a>(<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>, NULL,</div>
<div class="line">                               <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> + 1);</div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a69c1ed611ea245f8e77b28d2e47d4079" title="Numero di matrici realizzate (utilita&#39; statistica)">matriciRealizzate</a> += 1;</div>
<div class="line"></div>
<div class="line">    TRACE(<span class="stringliteral">&quot;[PilaMatrici::next] Ora inizializzo due puntatori a intero, uno&quot;</span>&lt;&lt;</div>
<div class="line">          <span class="stringliteral">&quot;alla tabella attuale\n e uno alla nuova tabella.&quot;</span>&lt;&lt;</div>
<div class="line">          <span class="stringliteral">&quot;Mi serve per semplificare il codice&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <span class="keywordtype">int</span> somma = 0;</div>
<div class="line">    <span class="keywordtype">int</span> * t1 = <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>;</div>
<div class="line">    <span class="keywordtype">int</span> * t2 = temp-&gt;tabella;</div>
<div class="line"></div>
<div class="line">    TRACE(<span class="stringliteral">&quot;[PilaMatrici::next] Sommo tutte le 8 caselle attorno alla casella&quot;</span>&lt;&lt;</div>
<div class="line">          <span class="stringliteral">&quot;attuale.&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 1; j &lt; <a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 1; j++)</div>
<div class="line">        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt; <a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 1; i++)</div>
<div class="line">        {</div>
<div class="line">            somma = ( <a class="code" href="classPilaMatrici.html#a437f4876f3c26a991d84cd9c5d5302c6">getValore</a>(t1, i - 1, j - 1) +</div>
<div class="line">                      <a class="code" href="classPilaMatrici.html#a437f4876f3c26a991d84cd9c5d5302c6">getValore</a>(t1, i    , j - 1) +</div>
<div class="line">                      <a class="code" href="classPilaMatrici.html#a437f4876f3c26a991d84cd9c5d5302c6">getValore</a>(t1, i + 1, j - 1) +</div>
<div class="line">                      <a class="code" href="classPilaMatrici.html#a437f4876f3c26a991d84cd9c5d5302c6">getValore</a>(t1, i - 1, j    ) +</div>
<div class="line">                      <a class="code" href="classPilaMatrici.html#a437f4876f3c26a991d84cd9c5d5302c6">getValore</a>(t1, i + 1, j    ) +</div>
<div class="line">                      <a class="code" href="classPilaMatrici.html#a437f4876f3c26a991d84cd9c5d5302c6">getValore</a>(t1, i - 1, j + 1) +</div>
<div class="line">                      <a class="code" href="classPilaMatrici.html#a437f4876f3c26a991d84cd9c5d5302c6">getValore</a>(t1, i    , j + 1) +</div>
<div class="line">                      <a class="code" href="classPilaMatrici.html#a437f4876f3c26a991d84cd9c5d5302c6">getValore</a>(t1, i + 1, j + 1)</div>
<div class="line">                      );</div>
<div class="line"></div>
<div class="line">            <span class="keywordflow">if</span> (somma == 2) {</div>
<div class="line">                t2[i + j * (dimx + 2)] = t1 [i + j * (dimx + 2)];</div>
<div class="line">            }</div>
<div class="line">            <span class="keywordflow">if</span> (somma == 3) {</div>
<div class="line">                t2 [i + j * (dimx + 2)] = <a class="code" href="classPilaMatrici.html#a577b11e786ed923662e6be11c8b37340a3e2ddc8c435505116d0123d27fdf3582">vivo</a>;</div>
<div class="line">            }</div>
<div class="line">            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (somma &lt; 2 || somma &gt; 3) {</div>
<div class="line">                t2 [i + j * (dimx + 2)] = <a class="code" href="classPilaMatrici.html#a577b11e786ed923662e6be11c8b37340a64f830c1ec16dabf749b8026e8e0265e">morto</a>;</div>
<div class="line">            }</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">    TRACE(<span class="stringliteral">&quot;[PilaMatrici::next] Rendo la matrice appena creata&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">      * Aggiorno i puntatori della matrice attuale e quella successiva.</span></div>
<div class="line"><span class="comment">      * Aggiorno il tempo della nuova matrice.</span></div>
<div class="line"><span class="comment">      */</span></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#ac71f38a0dc138d4b418316bd25e6b184">succ</a> = temp;</div>
<div class="line">    temp-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a6e8d24ed2b3038b41a7cc92f2aa8d984">prec</a> = <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>;</div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a> = temp;</div>
<div class="line">    temp-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> = (<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> + 1);</div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#ifdef DEBUG_MODE</span></div>
<div class="line"><span class="preprocessor"></span>    <span class="keywordtype">double</span> numeroCelluleVive = <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span> ( <a class="code" href="classPilaMatrici.html#a0b77a2c93ee5f238b41afcc91e7ade7d">contaCelluleVive</a>(temp) );</div>
<div class="line">    <span class="keywordtype">double</span> numeroCelluleVivePrecedente = <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span></div>
<div class="line">            ( <a class="code" href="classPilaMatrici.html#a0b77a2c93ee5f238b41afcc91e7ade7d">contaCelluleVive</a>(<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>) );</div>
<div class="line"></div>
<div class="line">    assert(numeroCelluleVive &gt;= 0);</div>
<div class="line"></div>
<div class="line"></div>
<div class="line">    LOG(<span class="stringliteral">&quot;Il numero di cellule vive e&#39;: &quot;</span> &lt;&lt; numeroCelluleVive &lt;&lt; <span class="stringliteral">&quot; / &quot;</span> &lt;&lt;</div>
<div class="line">        dimx * dimy &lt;&lt; <span class="stringliteral">&quot;. ( &quot;</span> &lt;&lt; (numeroCelluleVive * 100 / (dimx*dimy) )</div>
<div class="line">        &lt;&lt; <span class="stringliteral">&quot; % )\nQuesta e&#39; la matrice numero: &quot;</span> &lt;&lt; temp-&gt;tempo &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span></div>
<div class="line">        <span class="stringliteral">&quot;Confronto con la matrice precedente: &quot;</span> &lt;&lt; numeroCelluleVive -</div>
<div class="line">        numeroCelluleVivePrecedente &lt;&lt; <span class="stringliteral">&quot; (&quot;</span>&lt;&lt;</div>
<div class="line">        ( numeroCelluleVive * 100 / numeroCelluleVivePrecedente ) - 100</div>
<div class="line">        &lt;&lt; <span class="stringliteral">&quot; % )&quot;</span>&lt;&lt;endl );</div>
<div class="line"><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a> = temp;</div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">      * Ritorno la nuova posizione attuale, appena aggiornata. Prima era next.</span></div>
<div class="line"><span class="comment">      */</span></div>
<div class="line">    <span class="keywordflow">return</span> <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a817827747ed97447a71b8d083acf4744"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PilaMatrici::stampa </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stampa su stdout l'intera tabella. </p>
<dl class="section return"><dt>Restituisce</dt><dd>void </dd></dl>

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00215">215</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    cout&lt;&lt;<span class="stringliteral">&quot;[PilaMatrici::stampa] Stampo la matrice. Funzione di debug.\n&quot;</span>;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; <a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 2; j++)</div>
<div class="line">    {</div>
<div class="line">        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2; i++)</div>
<div class="line">        {</div>
<div class="line">            cout&lt;&lt;<a class="code" href="classPilaMatrici.html#a437f4876f3c26a991d84cd9c5d5302c6">getValore</a>(<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>, i, j)&lt;&lt;<span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line">        } cout&lt;&lt;endl;</div>
<div class="line">    }</div>
<div class="line">    cout&lt;&lt;endl;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad9b2af953563a35bc0533fafac0ad32f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int PilaMatrici::getDimx </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Ritorna la dimensione orizzontale della matrice. </p>
<dl class="section return"><dt>Restituisce</dt><dd>dimx </dd></dl>

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00118">118</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>
<div class="fragment"><div class="line">{ <span class="keywordflow">return</span> <a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a>;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="adbc7b723d420ee0475c6962387114a0e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int PilaMatrici::getDimy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Ritorna la dimensione verticale della matrice. </p>
<dl class="section return"><dt>Restituisce</dt><dd>dimy </dd></dl>

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00124">124</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>
<div class="fragment"><div class="line">{ <span class="keywordflow">return</span> <a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a>;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae6acf13fe85f6e4c8b050932c7c109c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool PilaMatrici::salva </td>
          <td>(</td>
          <td class="paramtype">QString&#160;</td>
          <td class="paramname"><em>file</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Salvataggio su File della matrice. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>Nome del file su cui salvare </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Restituisce</dt><dd>True se il salvataggio termina correttamente </dd>
<dd>
False se l'input stream non si apre correttamente</dd></dl>
<p>La funzione utilizza la QString passatagli per argomento come percorso e il nome del file da salvare. Salva le dimensioni della matrice, il numero della matrice e l'intera tabella. Ritorna true se la funzione termina correttamente, falso se lo stream in uscita non viene creato correttamente. </p>

<p>Definizione alla linea <a class="el" href="pilamatrici__IO_8cpp_source.html#l00005">5</a> del file <a class="el" href="pilamatrici__IO_8cpp_source.html">pilamatrici_IO.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    ofstream <a class="code" href="classPilaMatrici.html#ae6acf13fe85f6e4c8b050932c7c109c0" title="Salvataggio su File della matrice.">salva</a> (file.toStdString().data());</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">if</span> (!<a class="code" href="classPilaMatrici.html#ae6acf13fe85f6e4c8b050932c7c109c0" title="Salvataggio su File della matrice.">salva</a>)</div>
<div class="line">        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#ae6acf13fe85f6e4c8b050932c7c109c0" title="Salvataggio su File della matrice.">salva</a>&lt;&lt;this-&gt;<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a>&lt;&lt;<span class="stringliteral">&quot; &quot;</span>&lt;&lt;this-&gt;<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a>&lt;&lt;endl;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 1; j &lt; <a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 1; j++) {</div>
<div class="line">        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt; <a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 1; i++) {</div>
<div class="line">            <a class="code" href="classPilaMatrici.html#ae6acf13fe85f6e4c8b050932c7c109c0" title="Salvataggio su File della matrice.">salva</a>&lt;&lt;<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>[i + j * (dimx + 2)]&lt;&lt;<span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line">        } <a class="code" href="classPilaMatrici.html#ae6acf13fe85f6e4c8b050932c7c109c0" title="Salvataggio su File della matrice.">salva</a>&lt;&lt;endl;</div>
<div class="line">    }</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#ae6acf13fe85f6e4c8b050932c7c109c0" title="Salvataggio su File della matrice.">salva</a>.close();</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac37116f0525280353fccac6e1bbd7543"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool PilaMatrici::carica </td>
          <td>(</td>
          <td class="paramtype">QString&#160;</td>
          <td class="paramname"><em>file</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Caricamento da File della matrice. </p>
<dl class="params"><dt>Parametri</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>Nome del file da caricare </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Restituisce</dt><dd>True se la carica e' avvenuta correttamente </dd>
<dd>
False se l'output stream non si apre correttamente</dd></dl>
<p>La funzione apre uno stream in input utilizzando come file la QString passata per argomento. Dopo aver caricato le dimensioni la funzione crea una nuova lista di matrici con le opportune inizializzazioni e carica l'intera matrice di input. Il valore di ritorno e' true se la carica si conclude con successo e false se lo stream in input non viene creato correttamente. </p>

<p>Definizione alla linea <a class="el" href="pilamatrici__IO_8cpp_source.html#l00025">25</a> del file <a class="el" href="pilamatrici__IO_8cpp_source.html">pilamatrici_IO.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    ifstream <a class="code" href="classPilaMatrici.html#ac37116f0525280353fccac6e1bbd7543" title="Caricamento da File della matrice.">carica</a> (file.toStdString().data());</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">if</span> (!<a class="code" href="classPilaMatrici.html#ac37116f0525280353fccac6e1bbd7543" title="Caricamento da File della matrice.">carica</a>)</div>
<div class="line">        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#ac37116f0525280353fccac6e1bbd7543" title="Caricamento da File della matrice.">carica</a>&gt;&gt;<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a>&gt;&gt;<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a>;</div>
<div class="line">    TRACE(<span class="stringliteral">&quot;[PilaMatrici::carica] modificati dimx e dimy&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#acb98428fafcbc5b0b6664c15c0b56112">testa</a> = <a class="code" href="classPilaMatrici.html#a1c99597cb1b8fc81bd8df0a74c04cea2">creaMatrice</a>(NULL, NULL, 0);</div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a08b715899e30cd0995ee8750e06b0b0c">coda</a> = <a class="code" href="classPilaMatrici.html#acb98428fafcbc5b0b6664c15c0b56112">testa</a>;</div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a> = <a class="code" href="classPilaMatrici.html#acb98428fafcbc5b0b6664c15c0b56112">testa</a>;</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a69c1ed611ea245f8e77b28d2e47d4079" title="Numero di matrici realizzate (utilita&#39; statistica)">matriciRealizzate</a> = 0;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 1; j &lt; dimy + 1; j++) {</div>
<div class="line">        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt; <a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 1; i++) {</div>
<div class="line">            <a class="code" href="classPilaMatrici.html#ac37116f0525280353fccac6e1bbd7543" title="Caricamento da File della matrice.">carica</a>&gt;&gt;<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>[i + j * (dimx + 2)];</div>
<div class="line">        }</div>
<div class="line">    }</div>
<div class="line"></div>
<div class="line">    GD3(cout&lt;&lt;<span class="stringliteral">&quot;[PilaMatrici::carica] tabella:&quot;</span>&lt;&lt;endl;</div>
<div class="line">        this-&gt;<a class="code" href="classPilaMatrici.html#a817827747ed97447a71b8d083acf4744" title="Stampa su stdout l&#39;intera tabella.">stampa</a>();</div>
<div class="line">        ); <span class="comment">//Fine GD3</span></div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a24ae0fe74a46693ea24582a8608ce8df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool PilaMatrici::timeTrip </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>tempoDesiderato</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Viaggio nel tempo. </p>
<dl class="section return"><dt>Restituisce</dt><dd>True se il viaggio nel tempo termina correttamente </dd>
<dd>
False se il tempo desiderato passato per argomento non rispetta le condizioni di esistenza</dd></dl>
<p>La funzione controlla che il tempo desiderato sia nel range delle matrici realizzate. In tal caso valuta se deve andare avanti o indietro nella lista. Lo spostamento avviene tramite i puntatori della lista e chiamate ricorsive. Nel caso i controlli di esistenza della matrice richiesta diano errore, la funzione ritorna falso. </p>

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00259">259</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">      * Se il tempo desiderato è maggiore della matrice attuale, allora....</span></div>
<div class="line"><span class="comment">      */</span></div>
<div class="line">    <span class="keywordflow">if</span> (<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> &lt; tempoDesiderato) {</div>
<div class="line">        <span class="keywordflow">if</span> (<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#ac71f38a0dc138d4b418316bd25e6b184">succ</a> == NULL) {</div>
<div class="line">            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line">        }</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a> = <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#ac71f38a0dc138d4b418316bd25e6b184">succ</a>;</div>
<div class="line">        <span class="keywordflow">return</span> <a class="code" href="classPilaMatrici.html#a24ae0fe74a46693ea24582a8608ce8df" title="Viaggio nel tempo.">timeTrip</a>(tempoDesiderato);</div>
<div class="line">    }</div>
<div class="line"></div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">      * Se il tempo desiderato è maggiore di 0 (controllo precedente) e minore</span></div>
<div class="line"><span class="comment">      * del tempo attuale, allora la matrice esiste e aggiorno la matrice</span></div>
<div class="line"><span class="comment">      * attuale a quella precedente fino a che non arrivo alla condizione</span></div>
<div class="line"><span class="comment">      * in cui il tempo desiderato è uguale al tempo attuale.</span></div>
<div class="line"><span class="comment">      */</span></div>
<div class="line">    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a11f3959976e442888b365e37b1c70de9">tempo</a> &gt; tempoDesiderato) {</div>
<div class="line">        <span class="keywordflow">if</span> (<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a6e8d24ed2b3038b41a7cc92f2aa8d984">prec</a> == NULL) {</div>
<div class="line">            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line">        }</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a> = <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a6e8d24ed2b3038b41a7cc92f2aa8d984">prec</a>;</div>
<div class="line">        <span class="keywordflow">return</span> <a class="code" href="classPilaMatrici.html#a24ae0fe74a46693ea24582a8608ce8df" title="Viaggio nel tempo.">timeTrip</a>(tempoDesiderato);</div>
<div class="line">    }</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a1c99597cb1b8fc81bd8df0a74c04cea2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structPilaMatrici_1_1Matrix.html">PilaMatrici::Matrix</a> * PilaMatrici::creaMatrice </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td>
          <td class="paramname"><em>succ</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td>
          <td class="paramname"><em>prec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>tempo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00063">63</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    Matrix* temp = <span class="keyword">new</span> Matrix;</div>
<div class="line"></div>
<div class="line">    TRACE(<span class="stringliteral">&quot;[PilaMatrici::creaMatrice] Ho creato una nuova matrice allocata&quot;</span>&lt;&lt;</div>
<div class="line">          <span class="stringliteral">&quot;dinamicamente.&quot;</span>);</div>
<div class="line"></div>
<div class="line">    temp-&gt;succ = succ;</div>
<div class="line">    temp-&gt;prec = prec;</div>
<div class="line"></div>
<div class="line">    temp-&gt;tabella = <span class="keyword">new</span> <span class="keywordtype">int</span>[(<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a>+2) * (<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a>+2)];</div>
<div class="line"></div>
<div class="line">    TRACE(<span class="stringliteral">&quot;[PilaMatrici::creaMatrice] Ho assegnato la matrice dinamica con&quot;</span>&lt;&lt;</div>
<div class="line">          <span class="stringliteral">&quot;le dimensioni &quot;</span>&lt;&lt;<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a>&lt;&lt;<span class="stringliteral">&quot; e &quot;</span>&lt;&lt;<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a>&lt;&lt;<span class="stringliteral">&quot; correttamente.&quot;</span>)</div>
<div class="line"></div>
<div class="line">    <a class="code" href="classPilaMatrici.html#a213a3a18abf6e92b728228329cd84e82">inizializzaTabella</a>(temp, 0);</div>
<div class="line"></div>
<div class="line">    temp-&gt;tempo = tempo;</div>
<div class="line"></div>
<div class="line">    TRACE(&quot;[<a class="code" href="classPilaMatrici.html" title="The PilaMatrici class La classe PilaMatrici si occupa della parte algoritmica e computazionale.">PilaMatrici</a>::<a class="code" href="classPilaMatrici.html#a1c99597cb1b8fc81bd8df0a74c04cea2">creaMatrice</a>] Ho inizializzato a 0 la matrice&quot;&lt;&lt;</div>
<div class="line">          &quot;e aggiornato il tempo.&quot;);</div>
<div class="line"></div>
<div class="line">    return temp;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad27fd7ae4c80db6f058e4f1c1d53bbc3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void PilaMatrici::riempiCasuale </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td>
          <td class="paramname"><em>pos</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00094">94</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    srand( time(0) );</div>
<div class="line">    <span class="keywordtype">int</span> tot = 0;</div>
<div class="line"></div>
<div class="line">    TRACE(<span class="stringliteral">&quot;[PilaMatrici::riempiCasuale] Ora inizializzo casualmente gli&quot;</span>&lt;&lt;</div>
<div class="line">          <span class="stringliteral">&quot;elementi interni della matrice.&quot;</span>);</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 1; j &lt; <a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 1; j++)</div>
<div class="line">        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt; <a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 1; i++)</div>
<div class="line">        {</div>
<div class="line">            <span class="keywordtype">int</span> temp = ( rand() / <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (RAND_MAX) + 0.5);</div>
<div class="line">            tot += temp;</div>
<div class="line">            pos-&gt;tabella[i + j * (dimx + 2)] = temp;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">    TRACE(<span class="stringliteral">&quot;[PilaMatrici::riempiCasuale] Ho inizializzato tutta la matrice&quot;</span>&lt;&lt;</div>
<div class="line">          <span class="stringliteral">&quot;esclusa la cornice esterna.&quot;</span>);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a213a3a18abf6e92b728228329cd84e82"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void PilaMatrici::inizializzaTabella </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td>
          <td class="paramname"><em>tabellaAttuale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>valore</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00114">114</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2) * (<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 2); j++)</div>
<div class="line">    {</div>
<div class="line">        tabellaAttuale-&gt;tabella[j] = valore;</div>
<div class="line">    }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad0932211906943c62a4880d76baacb9c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool PilaMatrici::inizializzaCasella </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>casella</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>valore</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00122">122</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">if</span> (casella &gt; (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2) * (<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 2) || casella &lt; 0)</div>
<div class="line">        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line">    <span class="keywordflow">else</span> tabellaAttuale-&gt;tabella[casella] = valore;</div>
<div class="line">    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a437f4876f3c26a991d84cd9c5d5302c6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int PilaMatrici::getValore </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>cella</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00131">131</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">return</span> ( t[x + y * (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2)] );</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0b77a2c93ee5f238b41afcc91e7ade7d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int PilaMatrici::contaCelluleVive </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&amp;&#160;</td>
          <td class="paramname"><em>matrice</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00229">229</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    matrice-&gt;numeroCelleVive = 0;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2) * (<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 2); j++)</div>
<div class="line">    {</div>
<div class="line">        <span class="keywordflow">if</span> (matrice-&gt;tabella[j] == <a class="code" href="classPilaMatrici.html#a577b11e786ed923662e6be11c8b37340a3e2ddc8c435505116d0123d27fdf3582">vivo</a>)</div>
<div class="line">            matrice-&gt;numeroCelleVive++;</div>
<div class="line">    }</div>
<div class="line">    assert (matrice-&gt;numeroCelleVive &gt;= 0);</div>
<div class="line">    <span class="keywordflow">return</span> matrice-&gt;numeroCelleVive;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a03cfd164141c4f0df8e826ed44d2155a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool PilaMatrici::verificaMatriciUguali </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td>
          <td class="paramname"><em>tabellaAttuale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a> *&#160;</td>
          <td class="paramname"><em>tabellaConfronto</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00244">244</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">if</span> (tabellaAttuale-&gt;tempo == 0 || tabellaAttuale-&gt;tempo &lt;</div>
<div class="line">            tabellaConfronto-&gt;tempo)</div>
<div class="line">        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2) * (<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 2); i++)</div>
<div class="line">    {</div>
<div class="line">        <span class="keywordflow">if</span> (tabellaAttuale-&gt;tabella[i] != tabellaConfronto-&gt;tabella[i])</div>
<div class="line">            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line">    }</div>
<div class="line">    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae04b8c2af5ccc24233d8936d333a9830"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void PilaMatrici::patternModeSelector </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>selector</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00289">289</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">switch</span> (selector) {</div>
<div class="line">    <span class="keywordflow">case</span> 0:</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a213a3a18abf6e92b728228329cd84e82">inizializzaTabella</a>(<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>, 0);</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#ad27fd7ae4c80db6f058e4f1c1d53bbc3">riempiCasuale</a>(<a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>);</div>
<div class="line">        <span class="keywordflow">break</span>;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">case</span> 1:</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a1af0000c2498b94443a0cbf523f0217a">pattern1</a>();</div>
<div class="line">        <span class="keywordflow">break</span>;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">case</span> 2:</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#ab36fca974f9ec75ae3a385bbc4d14c0e">pattern2</a>();</div>
<div class="line">        <span class="keywordflow">break</span>;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">case</span> 3:</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a833d75c828cf42c6a7aaaafcf9ccdcd6">pattern3</a>();</div>
<div class="line">        <span class="keywordflow">break</span>;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">case</span> 4:</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#abe47ae91e03eb993a0f7273c6a5f0e76">pattern4</a>();</div>
<div class="line">        <span class="keywordflow">break</span>;</div>
<div class="line"></div>
<div class="line">        <span class="comment">/*</span></div>
<div class="line"><span class="comment">          * Questo caso serve per quando carico la matrice dal file.</span></div>
<div class="line"><span class="comment">          * Invocando di nuovo il costruttore, devo garantire che la selezione</span></div>
<div class="line"><span class="comment">          * del pattern non modifichi la matrice caricata, altrimenti non</span></div>
<div class="line"><span class="comment">          * servirebbe più a nulla.</span></div>
<div class="line"><span class="comment">          */</span></div>
<div class="line">    <span class="keywordflow">case</span> 99:</div>
<div class="line">        <span class="keywordflow">break</span>;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">default</span>:</div>
<div class="line">        cerr&lt;&lt;<span class="stringliteral">&quot;[patternModeSelector] errore: numero pattern non corretto &quot;</span>&lt;&lt;</div>
<div class="line">              selector&lt;&lt;endl;</div>
<div class="line">        exit(-1);</div>
<div class="line">    }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a1af0000c2498b94443a0cbf523f0217a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void PilaMatrici::pattern1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00329">329</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2) * (<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 2); ) {</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>[j] = 1;</div>
<div class="line">        j += 2;</div>
<div class="line">    }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab36fca974f9ec75ae3a385bbc4d14c0e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void PilaMatrici::pattern2 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00337">337</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2) * (<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 2); ) {</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>[j] = 1;</div>
<div class="line">        j += (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 1);</div>
<div class="line">    }</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2) * (<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 2); ) {</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>[j] = 1;</div>
<div class="line">        j += (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 3);</div>
<div class="line">    }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a833d75c828cf42c6a7aaaafcf9ccdcd6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void PilaMatrici::pattern3 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00350">350</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; (i + 15) &lt; (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2) * (<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 2); ) {</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>[i] = 1;</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>[i + 15] = 1;</div>
<div class="line">        i += 4;</div>
<div class="line">    }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="abe47ae91e03eb993a0f7273c6a5f0e76"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void PilaMatrici::pattern4 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8cpp_source.html#l00359">359</a> del file <a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = ((<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> + 2) * (<a class="code" href="classPilaMatrici.html#a5628d441e7836fd04c73268f120d2d9e">dimy</a> + 2) / 2 ) - (<a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a> / 2) , j = 0;</div>
<div class="line">         j &lt; <a class="code" href="classPilaMatrici.html#a68e942fec2e4351413744ec4984b4dbe">dimx</a>;</div>
<div class="line">         i++, j++) {</div>
<div class="line">        <a class="code" href="classPilaMatrici.html#a70640328db16b15d5803639cf7da902e">posizioneAttuale</a>-&gt;<a class="code" href="structPilaMatrici_1_1Matrix.html#a5f92ea433100ecf4dc8163fb93404c9b">tabella</a>[i] = 1;</div>
<div class="line">    }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Documentazione dei membri dato</h2>
<a class="anchor" id="a69c1ed611ea245f8e77b28d2e47d4079"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PilaMatrici::matriciRealizzate</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Numero di matrici realizzate (utilita' statistica) </p>
<p>*Questa e' una variabile statistica </p>

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00161">161</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>

</div>
</div>
<a class="anchor" id="a68e942fec2e4351413744ec4984b4dbe"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int PilaMatrici::dimx</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00181">181</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5628d441e7836fd04c73268f120d2d9e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int PilaMatrici::dimy</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00182">182</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>

</div>
</div>
<a class="anchor" id="af028871def60fbc8c46fedd3b4c7571e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int PilaMatrici::pattern</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00183">183</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>

</div>
</div>
<a class="anchor" id="acb98428fafcbc5b0b6664c15c0b56112"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a>* PilaMatrici::testa</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00206">206</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>

</div>
</div>
<a class="anchor" id="a08b715899e30cd0995ee8750e06b0b0c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a>* PilaMatrici::coda</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00207">207</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>

</div>
</div>
<a class="anchor" id="a70640328db16b15d5803639cf7da902e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structPilaMatrici_1_1Matrix.html">Matrix</a>* PilaMatrici::posizioneAttuale</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definizione alla linea <a class="el" href="pilamatrici_8h_source.html#l00208">208</a> del file <a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a>.</p>

</div>
</div>
<hr/>La documentazione per questa classe è stata generata a partire dai seguenti file:<ul>
<li><a class="el" href="pilamatrici_8h_source.html">pilamatrici.h</a></li>
<li><a class="el" href="pilamatrici_8cpp_source.html">pilamatrici.cpp</a></li>
<li><a class="el" href="pilamatrici__IO_8cpp_source.html">pilamatrici_IO.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generato Ven 16 Nov 2012 15:59:35 per Life Runner da &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.2
</small></address>
</body>
</html>
